Returns a value that represents the day of the month based on a serial date number generated by DateSerial or DateValue.
DateSerial ないし DateValue 関数による日付データのシリアル変換値を基に、該当する日を返します。
Day (Number)
Day (Number)
Integer
整数
Number: A numeric expression that contains a serial date number from which you can determine the day of the month.
Number: 日情報を得る日付データのシリアル変換値を示す数値表式。
This function is basically the opposite of the DateSerial function, returning the day of the month from a serial date number generated by the DateSerial or the DateValue function. For example, the expression
この関数は基本的に DateSerial 関数と逆方向の機能を担っており、DateSerial や DateValue 関数による日付データのシリアル変換値を基に、該当する日を返します。こうした点は、下記のコードを実行してみると分かりやすいでしょう。
Print Day (DateSerial(1994, 12, 20))
Print Day(DateSerial(1994, 12, 20))
returns the value 20.
この場合の戻り値は 20 となります。
sub ExampleDay
sub ExampleDay
Print "Day " & Day(DateSerial(1994, 12, 20)) & " of the month"
Print "Day " & Day(DateSerial(1994, 12, 20)) & " of the month"
end sub
end sub